package com.example.lvsuo.controller.cxg;

import com.example.lvsuo.entity.cxg.vo.FlowDataVo;
import com.example.lvsuo.modal.Result;
import com.example.lvsuo.service.cxg.FlowDataService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("flowdatas")
public class FlowDataController {

@Autowired
    FlowDataService flowDataService;

@GetMapping
    public Result queryFlowData( FlowDataVo flowDataVo){ // 通过登录者id 查询我的申请
//    List<FlowDataVo> flowDataVos = flowDataService.queryFlowData(flowDataVo);

    PageHelper.startPage(flowDataVo.getPageCur(),flowDataVo.getPageSize());
    PageInfo pageInfo = new PageInfo(flowDataService.queryFlowData(flowDataVo));


    return  Result.back("ok","20000",pageInfo);
}


}
